﻿<!DOCTYPE html>
<html>
<head>
<title>旅游订单填写</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="full-screen" content="yes">
<meta name="browsermode" content="application">
<meta name="x5-fullscreen" content="true">
<meta name="x5-page-mode" content="app">
<link rel="stylesheet" type="text/css" href="../order/css/lxs_index.css"/>
<link rel="stylesheet" type="text/css" href="../order/css/lxsHeadFoot.css">
<link rel="stylesheet" type="text/css" href="../order/css/order_new.css"/>
<script src="../order/js/jquery-2.1.4.min.js"></script>
	<script src="/js/common.js"></script>
	<script src="/js/plugins/jrender/jrender.min.js"></script>
	<script src="/js/My97DatePicker/WdatePicker.js"></script>

	<link rel="stylesheet" href="/themes/css/core.css">
	<link rel="stylesheet" href="/themes/css/icon.css">
	<link rel="stylesheet" href="/themes/css/home.css">
	<script type="text/javascript" src="/themes/js/aui.js"></script>
	<script  src="/js/plugins/form/jquery.form.js"></script>
	<script>
        $(function () {

            var user = JSON.parse(sessionStorage.getItem("user"));
            if (user) {

            } else {
                location.href = "/login.html";
            }
            //地址
            //获取景点的id
            var params = getParams();
            if (params.id) {
                $.get("/tickets/" + params.id, function (data) {
                    console.log(data);
                    $("#product_id").val(data.id);
                    $("#userId").val(user.id);
                    $("#price").val(data.price);
                    $("#truename").val(user.nickName);
                    $(".userInfo").renderValues(data)
                });
				//跳转到支付页面
                $("#save").click(function () {
                    var url = $(this).data("href");
                    $("#infoForm").ajaxSubmit();

                    location.href =url+params.id;
                });
            } else {
                location.href = "/ticket.html";
            }

        })
	</script>
</head>
<body>

<div class="content">
	<div class="headTop">
		<a href="javascript:history.go(-1)" class="back"><i class="iconBack"></i></a><span>订单填写</span><a class="more"><i
			class="iconDian"></i><i class="iconDian"></i><i class="iconDian"></i></a>
	</div>
</div>


<div class="j_main m-main userInfo">

	<form action="/orders" method="post" name="form_1" id="infoForm">

		<div class="tit">
			<i></i>填写出游信息
		</div>
		<div class="txt">
			<dl>
				<dt>线路名称</dt>
				<dd class="line30" render-html="name">怀玉乡红色旅游基地纯玩3晚4日游【景点门票全含】</dd>
			</dl>
			<dl>
				<dt>游玩日期</dt>
				<dd><input name="createTime" onclick="WdatePicker();"></dd>
			</dl>
			<dl class="J_price">
				<dt>门票价格</dt>
				<dd class="box-flex-1 price pd0" id="adult_price_span" name="price"><span>￥ <span render-html="price"
																								  id="price_d"></span></span>
				</dd>
				<dd class="box-flex-2"><span class="subadd j_num"><span class="sub" data-type="adults"></span><input
						id="j_price_d_num" type="number" min="1" max="99" class="text_num" value="1"
						name="adult_num"><span class="add" data-type="adults"></span></span></dd>
			</dl>
		</div>
		<div class="txt txt2 J_baoxian">
		</div>
		<script type="text" id="j_baoxian_con"> <dl> <dt> <a href="javascript:;" class="j_baoxian_tit J_baoxian_info">

		</script>
		<script></script>
		<div class="tit">
			<i></i>填写联系人信息
		</div>
		<input name="user.id" id="userId" value="" type="hidden"/>
		<input name="price" id="price" value="" type="hidden"/>
		<input name="state" value="1" type="hidden"/>
		<input name="productState" value="1" type="hidden"/>
		<input name="product_id" id="product_id" value="" type="hidden"/>
		<input name="address.id" id="myAddress" value="" type="hidden"/>
		<div class="txt">
			<dl>
				<dt>联系人</dt>
				<dd><input maxlength="20" type="text" id="truename" name="truename" class="o_man" placeholder="真实姓名（必填）"
						   value=""></dd>
			</dl>
			<dl>
				<dt>手机号码</dt>
				<dd class="pd0"><input type="tel" name="mobiletel" id="n_mobiletel" class="o_number" maxlength="11"
									   placeholder="手机号码（必填）" value=""></dd>
				<dd style="width:8rem;-webkit-box-flex:inherit">
				</dd>
			</dl>


			<section class="aui-myOrder-content" id="addressId">
				<div>
					<div class="aui-Address-box">
						<div class="aui-Address-box-item">
							<div class="aui-Address-box-item-bd">
								<p id="addressName"></p>
							</div>
							<div class="aui-Address-box-item-ft">
								<p id="addressTelephone"></p>
							</div>
						</div>
						<div class="aui-Address-box-item">
							<div class="aui-Address-box-item-bd">
								<p id="addressSupaddress"></p>
								<p id="addressChildaddress"></p>
							</div>
						</div>
						<div class="aui-Address-box-item">
							<div class="aui-Address-box-item-bd">
								<p><input type="checkbox" class="check goods-check goodsCheck"
										  style="background-size: 17px 17px;"> <em style="padding-left:24px;">默认地址</em>
								</p>
							</div>
						</div>
					</div>
				</div>
			</section>


		</div>
		<div class="tourist_box j_youke_main">
			<div class="tit">
				<i></i>填写游客信息
			</div>
			<div class="txt" id="j_kehu_list">
			</div>
		</div>
		<script type="text" id="j_kehu_c">
			 <dl class="j_kehu_open"> <dt> <span>游客*i*</span> <div class="none"> <input maxlength="20" type="hidden" class="o_man tourist_name" name="insurance_username[]" placeholder="游客姓名（必填）"> <input type="hidden" class="o_man tourist_phone_number" name="phone_number[]" placeholder="手机号码（选填）"> <input type="hidden" class="o_man tourist_identity_card" name="idcard_no[]" placeholder="身份证号码（必填）">  </div> </dt> <dd> <font class="corBlue"><span>填写信息</span><i class="more fr"></i></font> </dd> </dl>

		</script>
		<script></script>

		<div class="booking_notes">
			<label><i class="on"></i>我已阅读并同意此产品的</label><a href="javascript:;" class="btn_notes">预订须知</a>
			<p>
				温馨提示：为了保障您的出游权益，请务必在线支付订单。
			</p>
		</div>
	</form>
	<div class="submintFix">
		<dl>
			<dt>
				<div class="price">
					订单总额 <span>￥<em render-html="price" class="j_all_money"></em></span>
				</div>
			</dt>
			<dd class="sbmFix">
				<button type="button" id="save" data-href="/mine/payment.html?id=">提交订单</button>
			</dd>
		</dl>
	</div>
</div>

<div class="j_kehu_window m-main" style="display:none;">
	<div class="headTop">
		<a href="javascript:history.go(-1)" class="back"><i class="iconBack"></i></a><span>添加游客信息</span><a
			class="btn"></a>
	</div>
	<div class="txt">
		<div class="txt_menu js_txt_menu" data-id="1">
			<dl>
				<dt class="w100">游客姓名</dt>
				<dd><input type="text" maxlength="20" class="m_input" j_name="insurance_username" placeholder="与证件姓名一致"
						   value=""></dd>
			</dl>
			<dl>
				<dt class="w100">手机号码</dt>
				<dd><input type="tel" maxlength="11" class="m_input" j_name="phone_number" placeholder="输入手机号(选填)"
						   value=""></dd>
			</dl>
			<dl class="id_code">
				<dt class="w100">身份证号码</dt>
				<dd><input type="text" class="m_input" j_name="idcard_no" placeholder="投保必填项(必填)" value=""></dd>
			</dl>
		</div>
	</div>
	<div class="txt_btn j_txt_btn_bc">
		<a href="javascript:;">保存</a>
	</div>
	<div class="com_one_popup js_toufang_box a-bouncein">
		<div class="com_popup_head">
			选择证件类型<i class="close"></i>
		</div>
		<div class="com_one_popup_box">
			<ul>
				<li class="on">身份证 <i class="on"></i></li>
				<li>军官证 <i></i></li>
				<li>台胞证 <i></i></li>
				<li>护照 <i></i></li>
				<li>其他 <i></i></li>
			</ul>
		</div>
	</div>
</div>

<script src="../order/js/min_com.js"></script>
<script src="../order/js/order_xianlu.js"></script>
<script>
    var is_dijie = '0';
    /*预定须知弹窗*/
    var cart_type_num = 0;
    var myScroll;
    var mobiletel_regexp = /^1[3|4|5|7|8|9][0-9]\d{8}$/;

    function loaded() {
        myScroll = new iScroll('contentWrapper');
    }

    function bodyscroll(e) {
        e.preventDefault();
    }

    document.addEventListener('DOMContentLoaded', function () {
        setTimeout(loaded, 200);
    }, false);
    $('.btn_notes').click(function () {
        $('.notes_con').show();
        setTimeout(loaded, 300);
        document.addEventListener('touchmove', bodyscroll, false);
    });
    $('.notes_con').click(function () {
        $(this).hide();
        document.removeEventListener('touchmove', bodyscroll, false);
    });
    /*60秒倒计时*/
    var wait = 60;


    function tourist_check() {
        var tourist_list = $(".j_kehu_open"),
            type = 1;
        for (var j = 0; j < tourist_list.length; j++) {
            var tr = tourist_list.eq(j);
            if (!tr.data('full')) {
                alert('请填写<b style="color:#FFF000">游客' + (j + 1) + '</b>的信息');
                type = 0;
                break;
            }
        }
        ;
        return type ? true : false;
    };
    /*$(function () {



    });*/

    function guoqing_yh() {

    }
</script>
</body>
</html>